import { NextResponse, NextRequest } from 'next/server'

const hasPerm = true

export function middleware(request: NextRequest) {
  if (hasPerm) {
    return NextResponse.next()
  }
  return NextResponse.redirect(new URL('/', request.url))
}

export const config = {
  matcher: '/list/:path*',
}